#地基承载力验证
class Ground_Bearing_Capacity_Verify:
    def __init__(self):
        self.copyright_info()
        self.area_trial = 0
        self.trial_area()

    def copyright_info(self):
        print('---------------------------------------------------------------------------')
        print('{0:^76}'.format('《基础工程》'))
        print('{0:^76}'.format('地基承载力验算'))
        print('---------------------------------------------------------------------------')

    def trial_area(self):
        fk = float(input('>>>>>请输入上部结构传至基础顶面竖向力的荷载效应标准组合值(kN):'))
        fa = float(input('>>>>>请输入修正后的地基承载力特征值（此时暂不考虑宽度修正，仅考虑深度修正(kPa):'))
        d = float(input('>>>>>请输入基础埋深(m):'))
        dw = float(input('>>>>>请输入地下水位埋深(m):'))
        if d >= dw:
            self.area_trial = fk/(fa-20*dw-10*(d-dw))
        else:
            self.area_trial = fk/(fa-20*d)
        print('仅考虑轴心荷载，初步试算面积为(m2):',self.area_trial)
        self.area_trial=1.2*self.area_trial
        print('由于偏心不大，基础地面积可考虑按增大20%考虑，即(m2):',self.area_trial)

if __name__ == '__main__':
    demo = Ground_Bearing_Capacity_Verify()